{extend name="/fool" /}
{block name="css"}
<link rel="stylesheet" href="/css/admin/product_list.css">
<style>
    .layui-form-onswitch{
        /*background: #1989FA;*/
        /*border-color: #1989FA;*/
    }
    .layui-upload-img{
        height:200px;
        width:200px;
        margin: 10px;
    }
    .value{
        text-align: left;
    }
    .fh{
        margin-left: 20px;
    }
</style>
{/block}
{block name="menu_content"}
<form class="layui-form" action="" method="post" enctype="multipart/form-data">
    <ul id="content">
        <li class="li">
            <table class="one">
                <tr>
                    <td class="one-one">标题：</td>
                    <td class="value">
                        <div class="layui-input-inline">
                            <input type="text" required name="title" autocomplete="off" class="layui-input" placeholder="输入标题">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="one-one">时长：</td>
                    <td class="value">
                        <div class="layui-input-inline">
                            <input type="number" required name="time" autocomplete="off" class="layui-input" placeholder="输入时长（分钟）">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="one-one">价格：</td>
                    <td class="value">
                        <div class="layui-input-inline">
                            <input type="text" required name="money" autocomplete="off" class="layui-input" placeholder="输入价格">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="one-one">
                        <button type="button" class="listbu layui-btn">返回</button>
                    </td>
                    <td class="value">
                        <button type="submit" class="fh layui-btn">保存</button>
                    </td>
                </tr>
            </table>
        </li>
    </ul>
</form>

<!-- 配置文件 -->
<script type="text/javascript" src="/utf8-php/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/utf8-php/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container',{
        initialFrameHeight: 300,
        initialFrameWidth: 500
    });
    "{if isset($error)}"
    alert("{$error}");
    location.href = "{:url('index')}";
    "{/if}"
</script>
<script>
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });


    $(".listbu").click(function(){
        location.href = "{:url('index')}";
    });
</script>
{/block}